package com.junzhiit.nengji.api.web.util.tools;

import java.text.DecimalFormat;
import java.util.Date;
import java.util.Random;

public class NumberUtils {
	
	public static String getOrderlNumber(){
		int max = 99999;
        int min = 10000;
        Random random = new Random();
        int num = random.nextInt(99999)%(max-min+1) + min;
        String number = String.valueOf(num) + String.valueOf(new Date().getTime()).substring(2, 13);
		return number;
	}
	
	public static String getMchBillno(){
		int max = 99999;
        int min = 10000;
        Random random = new Random();
        int num = random.nextInt(99999)%(max-min+1) + min;
        String number = String.valueOf(num) + String.valueOf(new Date().getTime()).substring(3, 13);
		return number;
	}
	
	public static String getSystemCode(long value){
		DecimalFormat df =  new DecimalFormat("0000");
		return df.format(value);
	}
	
	public static void main(String[] args) {
		System.out.println(getMchBillno());
	}
}
